/**
 * 
 */
package br.com.cocodonto.modelo.entidade;

/**
 * @author PCZERO
 *
 */
public class Paciente {
	private long id;
	private String name;
	private String rq;
	private String cpf;
	
	private Sexotype sexo;
		
	private Endereco endereco;

	private Contacto contacto;

	public Paciente(long id, String name, String rq, String cpf, Sexotype sexo,
			Endereco endereco, Contacto contacto) {
		super();
		this.id = id;
		this.name = name;
		this.rq = rq;
		this.cpf = cpf;
		this.sexo = sexo;
		this.endereco = endereco;
		this.contacto = contacto;
	}

	public Paciente(long id, String name, String rq, String cpf, Sexotype sexo) {
		super();
		this.id = id;
		this.name = name;
		this.rq = rq;
		this.cpf = cpf;
		this.sexo = sexo;
	}

	public Paciente(String name, String rq, String cpf, Sexotype sexo) {
		super();
		this.name = name;
		this.rq = rq;
		this.cpf = cpf;
		this.sexo = sexo;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getRq() {
		return rq;
	}

	public void setRq(String rq) {
		this.rq = rq;
	}

	public String getCpf() {
		return cpf;
	}

	public void setCpf(String cpf) {
		this.cpf = cpf;
	}

	public Sexotype getSexo() {
		return sexo;
	}

	public void setSexo(Sexotype sexo) {
		this.sexo = sexo;
	}

	public Endereco getEndereco() {
		return endereco;
	}

	public void setEndereco(Endereco endereco) {
		this.endereco = endereco;
	}

	public Contacto getContacto() {
		return contacto;
	}

	public void setContacto(Contacto contacto) {
		this.contacto = contacto;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((cpf == null) ? 0 : cpf.hashCode());
		result = prime * result + (int) (id ^ (id >>> 32));
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + ((rq == null) ? 0 : rq.hashCode());
		result = prime * result + ((sexo == null) ? 0 : sexo.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Paciente other = (Paciente) obj;
		if (cpf == null) {
			if (other.cpf != null)
				return false;
		} else if (!cpf.equals(other.cpf))
			return false;
		if (id != other.id)
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (rq == null) {
			if (other.rq != null)
				return false;
		} else if (!rq.equals(other.rq))
			return false;
		if (sexo != other.sexo)
			return false;
		return true;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("Paciente [id=").append(id).append(", name=")
				.append(name).append(", rq=").append(rq).append(", cpf=")
				.append(cpf).append(", sexo=").append(sexo)
				.append(", endereco=").append(endereco).append(", contacto=")
				.append(contacto).append("]");
		return builder.toString();
	}
	
}
